<?php

/**
 * Class Sidebarmodel
 * 
 * 
 *
 * @package     care and comfort
 * @subpackage  Models
 * @category    Authentication
 * @author      pradeep kumar (rampelli)
 * @copyright   Copyright (c) 2009, tech-pundits.com
 * @license		http://www.gnu.org/licenses/lgpl.html
 * @link 		http://tech-pundits.com
 * @version	1.1
 */

class Sidebarmodel extends Model{
	
	function Sidebarmodel()
	{
		
		parent::Model();
		$this->_prefix = $this->config->item('FAL_table_prefix');
        $this->_table = $this->_prefix.'sidelinks_active';
	}
	
	//function to get the active side links
	
	function get_active_sidebar()
	{
		$this->db->where('active', 'true'); 
		
		$result= $this->db->get($this->_table);
		
		$sidelinks = $result->result();
		
		$result->free_result();
		
		return $sidelinks;
		
       }
       //this is servicesmenu selected
   function get_servicesmenu()
    {
 	   $this->db->select(); 
 	
 	   $result= $this->db->get($this->_table);
 	   
 	   return $result;
    }
    function editservicesmenu($value,$id)
	{
	
		$this->db->where('id',$id);
		//$this->db->update($this->_table,'active',$id);
		$this->db->update($this->_table,array('active' => $value));
		
	}
}

?>